package uuidThor

import (
	"github.com/bwmarrin/snowflake"
	"github.com/lithammer/shortuuid/v4"
	"github.com/segmentio/ksuid"
)

// GetNumberUUID 雪花id
func GetNumberUUID(nodeId int64) (string, error) {
	node, err := snowflake.NewNode(nodeId)
	if err != nil {
		return "", err
	}

	// Generate a snowflake ID.
	id := node.Generate()
	return id.String(), nil
}

// GetShortUUID 短的uuid
func GetShortUUID() string {
	return shortuuid.New()
}

// GetLongUUID 长的uuid
func GetLongUUID() string {
	return ksuid.New().String()
}
